package com.piggy.logi.sys.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.piggy.logi.sys.domain.LogiWaybillOrderRelate;
import com.piggy.logi.sys.mapper.LogiWaybillOrderRelateMapper;
import com.piggy.logi.sys.service.ILogiWaybillOrderRelateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 运单订单关联Service业务层处理
 *
 * @author fengxy
 * @date 2023/10/17 21:54
 **/
@Slf4j
@Service
public class LogiWaybillOrderRelateServiceImpl extends ServiceImpl<LogiWaybillOrderRelateMapper, LogiWaybillOrderRelate> implements ILogiWaybillOrderRelateService {

    @Override
    public List<LogiWaybillOrderRelate> listByWaybillIds(List<Long> waybillIds) {
        return list(Wrappers.lambdaQuery(LogiWaybillOrderRelate.class).in(LogiWaybillOrderRelate::getWaybillId, waybillIds));
    }

    @Override
    public List<LogiWaybillOrderRelate> listByGoodOrderIdIds(List<Long> goodOrderIds) {
        return list(Wrappers.lambdaQuery(LogiWaybillOrderRelate.class).in(LogiWaybillOrderRelate::getGoodOrderId, goodOrderIds));
    }
}
